package com.eian.boot.module.common.model.dto;

import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank;
import lombok.Data;

/**
 * 更新ID格式配置请求
 *
 * @author alex.meng
 */
@Data
@Schema(description = "更新ID格式配置请求")
public class UpdateIdConfigRequest {

    @NotBlank(message = "业务类型不能为空")
    @Schema(description = "业务类型标识", example = "order")
    private String bizType;

    @Schema(description = "ID主体内容类型：CUSTOM-自定义, SEGMENT-号段ID, SEQUENCE-序列号, SNOWFLAKE-雪花ID, UUID-UUID, UUID_STANDARD-UUID标准",
            example = "SEGMENT")
    private String idContentType;

    @Schema(description = "前缀模板类型：FIXED-固定值, YEAR-年份, YEAR_MONTH-年月, YEAR_MONTH_DAY-年月日, YEAR_MONTH_DAY_HOUR-年月日时, YEAR_MONTH_DAY_HOUR_MINUTE-年月日时分, MONTH_DAY-月日, TIMESTAMP_SECOND-时间戳(秒), TIMESTAMP_MILLIS-时间戳(毫秒)",
            example = "FIXED")
    private String prefixTemplate;

    @Schema(description = "ID前缀固定值（当prefixTemplate为FIXED时使用）", example = "ORD")
    private String prefix;

    @Schema(description = "后缀模板类型：同prefixTemplate", example = "FIXED")
    private String suffixTemplate;

    @Schema(description = "ID后缀固定值（当suffixTemplate为FIXED时使用）")
    private String suffix;

    @Schema(description = "补位字符", example = "0")
    private Character padChar;

    @Schema(description = "ID总长度（不包括前后缀，0表示不补位）", example = "10")
    private Integer idLength;

    @Schema(description = "补位位置：LEFT-左侧补位, RIGHT-右侧补位", example = "LEFT")
    private String padPosition;

    @Schema(description = "是否使用混淆：false-否, true-是", example = "false")
    private Boolean useObfuscate;

    @Schema(description = "状态：0-禁用, 1-启用", example = "1")
    private Integer status;

    @Schema(description = "业务描述", example = "订单ID配置")
    private String description;
}

